<?php use_helper('Date') ?>
<?php if(count($last20blogs))
{
	foreach($last20blogs as $blog)
{
?>
<div class='blogcontainer'>
<div style='float:left; width:150px'>
<img src='/uploads/avatars/thumbnail_100_100_p/<?php echo $blog['image'] ? $blog['image'] : 'noimage.jpg'  ?>' title='<?php echo $blog['lastname'].' '.$blog['firstname'] ?>' />
<div style='padding-top:5px;'>
<?php echo link_to($blog['lastname'].' '.$blog['firstname'],'blogs_author',array('id'=>$blog['user_id'],'pnumber'=>'1')) ?>
</div>
</div>
	<div style='float:left' class='blogpostside'>
	<h2>
<?php echo link_to($blog['title'],'blogs_view', Doctrine::getTable('BlogPost')->findOneBy('id',$blog['id']) ) ?>
	</h2>
	<em>
<?php echo format_date($blog['updated_at'],'f'); ?>
	</em><br />
	<div class='blogsshort'>
<?php echo $blog['short'] ?>
	</div>
<div class='anotherposts'>
<?php
if($last5posts[$blog['user_id']]) { ?>
<ul>
<?php foreach($last5posts[$blog['user_id']] as $post) { ?>
<li><h4><?php echo link_to($post->getTitle(),'blogs_view',$post); ?></h4></li>
<?php } ?>
</ul>
<?php } ?>
</div>
	</div>
	<div style='clear:both'></div>
</div>
<?php }} ?>